package subject;

import subject.Observer;
import trans.Transaction;

import java.util.List;
import java.util.Observable;

// 具体观察者
public class TransactionLogger implements Observer {
    @Override
    public void update(List<Transaction> transactions) {
        System.out.println("最新的记账记录：");
        for (Transaction t : transactions) {
            System.out.println(t);
        }
    }

}